package com.six.vo;

import java.sql.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 仓位
 * 
 */
@Entity
@Table(name="WMS_T_SITE")
public class Site {
	private int siteID;// VARCHAR(16) 仓位编号
	private String siteCode;// NVARCHAR2(60) 仓位代码
	private Date siteEditTime;// DATE 最后编辑时间
	private int siteIsDel;// SMALLINT 是否已被删除
	private Store store;
	private Set<Tray> tray;
	
	
	public Site() {
		super();
	}
	public Site(int siteID, String siteCode, Date siteEditTime,
			int siteIsDel, Store store, Set<Tray> tray) {
		super();
		this.siteID = siteID;
		this.siteCode = siteCode;
		this.siteEditTime = siteEditTime;
		this.siteIsDel = siteIsDel;
		this.store = store;
		this.tray = tray;
	}
	@Id
	@GeneratedValue
	public int getSiteID() {
		return siteID;
	}
	public void setSiteID(int siteID) {
		this.siteID = siteID;
	}
	public String getSiteCode() {
		return siteCode;
	}
	public void setSiteCode(String siteCode) {
		this.siteCode = siteCode;
	}
	public Date getSiteEditTime() {
		return siteEditTime;
	}
	public void setSiteEditTime(Date siteEditTime) {
		this.siteEditTime = siteEditTime;
	}
	public int getSiteIsDel() {
		return siteIsDel;
	}
	public void setSiteIsDel(int siteIsDel) {
		this.siteIsDel = siteIsDel;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="storeID") 	 // VARCHAR(16) 库房编号
	public Store getStore() {
		return store;
	}
	public void setStore(Store store) {
		this.store = store;
	}
	@OneToMany(cascade=CascadeType.ALL)
	public Set<Tray> getTray() {
		return tray;
	}
	public void setTray(Set<Tray> tray) {
		this.tray = tray;
	}
	

}
